import Foundation

struct Profile {
    var username: String
    var prefersNotifications = true
    var seasonalPhoto = Season.winter
    var goalDate = Date()
    
    // 变量名称添加`是因为default是一个关键字，添加反引号可以用关键字作为变量名
    static var `default` = Profile(username: "g_kumar")
    
    enum Season: String, CaseIterable, Identifiable {
        case spring = "🌷"
        case summer = "🌞"
        case autumn = "🍂"
        case winter = "☃️"
        
        // 为了遵守Identifiable协议，必须要有一个id属性
        var id: String { rawValue }
    }
}
